package org.qqcui.designpattern.patterns.proxy.cglib;

/**
 * CGLIB动态代理客户端
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022/5/1 10:39
 **/
public class Client {
    public static void main(String[] args) {
        TeacherDao teacherDao = new TeacherDao();
        ProxyFactory proxyFactory = new ProxyFactory(teacherDao);
        TeacherDao proxyInstance = (TeacherDao) proxyFactory.getProxyInstance();
        System.out.println(proxyInstance);
        proxyInstance.teach();
    }
}
